package com.sunwayworld.basemodule.business.batchrevise.resource;

import com.sunwayworld.basemodule.business.batchrevise.bean.LimsBatchReviseBean;
import com.sunwayworld.basemodule.business.batchrevise.service.LimsBatchReviseService;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import com.sunwayworld.framework.support.auditable.resource.GenericAuditableResource;
import com.sunwayworld.framework.support.base.resource.GenericResource;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@RequestMapping("/secure/basemodule/business/batch-revises")
public interface LimsBatchReviseResource extends GenericResource<LimsBatchReviseService, LimsBatchReviseBean, Long>, GenericAuditableResource<LimsBatchReviseService, LimsBatchReviseBean, Long> {

    @Log(value = "批量提交", type = LogType.UPDATE)
    @RequestMapping(value = "/submit", method = RequestMethod.POST)
    void batchSubmit(RestJsonWrapperBean wrapper);

    @Log(value = "提交", type = LogType.UPDATE)
    @RequestMapping(value = "/submitById/{id}", method = RequestMethod.POST)
    void submitById(@PathVariable Long id, RestJsonWrapperBean wrapper);

    @Log(value = "审批通过", type = LogType.UPDATE)
    @RequestMapping(value = "/approve", method = RequestMethod.POST)
    void approve(RestJsonWrapperBean wrapper);

    @Log(value = "审批拒绝", type = LogType.UPDATE)
    @RequestMapping(value = "/reject", method = RequestMethod.POST)
    void reject(RestJsonWrapperBean wrapper);

    @Log(value = "审批通过", type = LogType.UPDATE)
    @RequestMapping(value = "/approve/{id}", method = RequestMethod.POST)
    void approveById(@PathVariable Long id, RestJsonWrapperBean wrapper);

    @Log(value = "审批拒绝", type = LogType.UPDATE)
    @RequestMapping(value = "/reject/{id}", method = RequestMethod.POST)
    void rejectById(@PathVariable Long id, RestJsonWrapperBean wrapper);
}
